package com.ants.boot.system.dto.sysmenu;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * @author 蚂蚁会花呗
 * @date 2022/3/18 17:07
 */
@ApiModel(value = "菜单新增对象")
public class AddMenuDto {

    /**
     * 菜单名称
     */
    @ApiModelProperty(value = "菜单名称",required = true)
    @NotBlank(message = "菜单名称不能为空")
    @Size(max = 60,message = "名称太长！")
    private String menuName;

    /**
     * 父级菜单id，0为顶级菜单
     */
    @ApiModelProperty(value = "菜单父级id",required = true)
    private Integer pid;

    /**
     * 排序
     */
    @ApiModelProperty(value = "排序",required = true)
    private Integer orderNum;

    /**
     * 菜单路径
     */
    @ApiModelProperty(value = "菜单路径",required = true)
    private String path;

    /**
     * 组件路径
     */
    @ApiModelProperty(value = "组件路径",required = true)
    private String component;

    /**
     * 是否缓存 0缓存 1不缓存
     */
    @ApiModelProperty(value = "是否缓存",required = true)
    private Integer isCache;

    /**
     * 菜单类型M目录 C菜单 F按钮
     */
    @ApiModelProperty(value = "菜单类型",required = true)
    @NotBlank(message = "菜单类型不能为空！")
    private String menuType;

    /**
     * 菜单菜单状态 0显示 1隐藏
     */
    @ApiModelProperty(value = "是否显示",required = true)
    private String visible;

    /**
     * 权限标识
     */
    @ApiModelProperty(value = "权限标识",required = true)
    private String perms;

    /**
     * 菜单图标
     */
    @ApiModelProperty(value = "图标",required = true)
    private String icon;

    /**
     * 菜单备注
     */
    @ApiModelProperty(value = "备注",required = true)
    private String remark;

    @ApiModelProperty(value = "状态",required = true)
    @Range(min = 1,max = 2,message = "值只能是1或者2")
    private Integer status;


    public String getMenuName() {
        return menuName;
    }

    public void setMenuName(String menuName) {
        this.menuName = menuName;
    }

    public Integer getPid() {
        return pid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    public Integer getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(Integer orderNum) {
        this.orderNum = orderNum;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getComponent() {
        return component;
    }

    public void setComponent(String component) {
        this.component = component;
    }

    public Integer getIsCache() {
        return isCache;
    }

    public void setIsCache(Integer isCache) {
        this.isCache = isCache;
    }

    public String getMenuType() {
        return menuType;
    }

    public void setMenuType(String menuType) {
        this.menuType = menuType;
    }

    public String getVisible() {
        return visible;
    }

    public void setVisible(String visible) {
        this.visible = visible;
    }

    public String getPerms() {
        return perms;
    }

    public void setPerms(String perms) {
        this.perms = perms;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }
}
